#if !defined(RESOURCEEFFECTVARIABLES_H)
#define RESOURCEEFFECTVARIABLES_H

#include "resource.h"
#include <map>
#include <string>

namespace gunsmith
{
enum EVTYPE
{
	VT_MATRIX,
	VT_VECTOR,
	VT_INT,
	VT_FLOAT,
	VT_TEXTURE
};

struct TEffectVariable
{
	void*	pData;
	EVTYPE	eType;
};

typedef std::map<std::string, TEffectVariable*> VARMAP;
/*!	\class CResourceEffectVariables
	\brief Effect variable resource handles global variables set in a shader. */
class CResourceEffectVariables : public CResource
{
public:
							CResourceEffectVariables	();
	virtual					~CResourceEffectVariables	();
	virtual bool			Create						(void *pSource);
	virtual void			Destroy						();
	const TEffectVariable*	GetVar						(std::string sName);
	void					UpdateVariable				(std::string sName, TEffectVariable* pVariable);

private:
	VARMAP	m_mVariables;
};
}

#endif //RESOURCEEFFECTVARIABLES_H
